#include <catch2/catch.hpp>

#include "solution.hpp"

using namespace solution_081;

TEST_CASE("81. Search in Rotated Sorted Array II", "[081]") {

CHECK(Solution().search({2,5,6,0,0,1,2}, 0) == true);
CHECK(Solution().search({2,5,6,0,0,1,2}, 3) == false);
CHECK(Solution().search({3,1}, 3)           == true);
CHECK(Solution().search({1,2,1}, 2)         == true);
CHECK(Solution().search({}, 5)              == false);
CHECK(Solution().search({1}, 2)             == false);

}
